package com.latefly.skewwork.ui.page.login.register

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController


@Composable
fun Information(
    navController: NavHostController,
    modifier: Modifier = Modifier
) {
    Column(
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        Row {
            Text(text = "账户注册")
        }

        //头像
        Row(
            modifier = Modifier.padding(top = 30.dp, bottom = 30.dp)
        ) {
            Card(
                modifier = Modifier,
                border = BorderStroke(color = Color.Gray, width = Dp.Hairline),
                shape = CircleShape//设置圆角
            ) {
                Text(text = "     ")
            }
        }
        Row(
            verticalAlignment = Alignment.CenterVertically
        )  {
            Text(text = "账户")
            Spacer(modifier = Modifier.size(10.dp))
            TextField(
                value = "",
                onValueChange = {},
                modifier = Modifier
                    .weight(3f)
                    .padding(bottom = 5.dp)
            )
        }
        Row(
            verticalAlignment = Alignment.CenterVertically
        )  {
            Text(text = "密码")
            Spacer(modifier = Modifier.size(10.dp))
            TextField(
                value = "",
                onValueChange = {},
                modifier = Modifier
                    .weight(3f)
                    .padding(bottom = 5.dp)
            )
        }
        Row(
            verticalAlignment = Alignment.CenterVertically
        ) {
            Text(text = "确认密码")
            Spacer(modifier = Modifier.size(10.dp))
            TextField(
                value = "",
                onValueChange = {},
                modifier = Modifier
                    .weight(3f)
                    .padding(bottom = 5.dp)
            )
        }

        Row {
            Button(
                onClick = { navController.navigate("Login") },
                modifier = Modifier
                    .weight(1f)
                    .height(50.dp)
            ) {
                Text(text = "Back")
            }
            Button(
                onClick = { navController.navigate("Login/Verify") },
                modifier = Modifier
                    .weight(1f)
                    .height(50.dp)
            ) {
                Text(text = "Next")
            }

        }
    }
}